Hello, I built a dxl window using topMost and block, but I want to add a close button on this little window, which destroy this window and make active the big window built with create. But simply does not work. the little window is destroyed but the big one is minimized. I do not know why does not work.
Marina_Raf - Thu Dec 18 13:18:30 EST 2014 |
Re: dxl window- topMost Hmm ... I never bothered to even try to understand the "jumping" windows of DOORS. As far as I know you have two options - you either need to get the "parenting" right, i.e. tell DOORS which window is the child of which other. Then when a dialog closes, its parent (either the DB Explorer, or a Module or another Dialog will be brought to front)
DB dbParent= centered "Parent"
void childFunc (DBE) {
DB child = topMost ("Child")
realize child
// note that child needs to be visible (realize) before parenting it
setParent (child, dbParent)
block child
release child
destroy child
}
DBE button = button (dbParent, "Launch Child", childFunc)
show dbParent
- or you can try to actually bring your parent dialog back to front after the child closes:
DB dbParent= centered "Parent"
void childFunc (DBE) {
DB child = topMost ("Child")
realize child
block child
release child
destroy child
// bring the parent back to top ...
raise dbParent
}
DBE button = button (dbParent, "Launch Child", childFunc)
show dbParent
Hope that helps, regards, Mathias |